<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" v-model="ques">
       <p> {{ans}}</p>
    </div>
    <script type="module">
        import {createApp,ref,watch} from './node_modules/vue/dist/vue.esm-browser.js'
        createApp({
          setup(){
            const ques = ref('')
            const ans = ref('')
            watch(ques,(newVal,oldVal)=>{
                ans.value = ques.value +'回答'
            })
            return {
                ques,ans
            }
          }
        }).mount('#app')
    </script>
</body>

</html>